package com.chance.cc.crawler.development.command.publish.vm;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.vm.pcauto.realtime.PcautoWebHjRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.job.domain.vm.pcauto.simple.*;
import com.chance.cc.crawler.development.command.job.domain.vm.pcauto.trace.PcautoWebHjTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.trigger.domain.vm.realtime.RealtimeCronCrawlerTriggerInfo;
import com.chance.cc.crawler.development.command.trigger.domain.vm.realtime.RealtimeSimpleCrawlerTriggerInfo;
import com.chance.cc.crawler.development.command.trigger.domain.vm.trace.TraceCronCrawlerTriggerInfo;

/**
 * @Author Zhao.Hhuan
 * @Date Create in 2021/3/5 11:54
 * @Description
 *      太平洋号 板块
 **/
public class PublishPcautoCrawlerJob {
    private static final String domain = "pcauto";

    public static void main(String[] args) {
//        publishModuleSimpleJob();
//        publishModuleRealtimeJob();
//        publishModuleTraceJob();
//        publishModuleSimple1Job();
//        publishModuleSimple2Job();
//        publishModuleSimple41Job();
//        publishModuleSimple91Job();
//        publishModuleSimple92Job();

        publishArticleSimpleJob();

//        PcautoPublishScript.publishCrawlerNodeScript();
    }

    /**
     * 太平洋号单次调度
     */
    public static void publishArticleSimpleJob(){
        String node = "太平洋号";
        CrawlerJob crawlerJob = PcAutoArticleSimpleCrawlerSchedulerJob.publishPcAutoCrawlerSchedulerJobInfo();
        RealtimeSimpleCrawlerTriggerInfo.simpleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,node);
    }

    /**
     * 太平洋号单次调度
     */
    public static void publishModuleSimpleJob(){
        String node = "太平洋号";
//        CrawlerJob crawlerJob = PcautoWebHjSimpleCrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        CrawlerJob crawlerJob = PcautoWebHjCoreSimpleCrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        RealtimeSimpleCrawlerTriggerInfo.simpleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,node);
    }

    public static void publishModuleSimple1Job(){
        String node = "太平洋号";
        CrawlerJob crawlerJob = PcautoWebHjCoreSimple1CrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        RealtimeSimpleCrawlerTriggerInfo.simpleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,node);
    }
    public static void publishModuleSimple2Job(){
        String node = "太平洋号";
        CrawlerJob crawlerJob = PcautoWebHjCoreSimple2CrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        RealtimeSimpleCrawlerTriggerInfo.simpleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,node);
    }
    public static void publishModuleSimple91Job(){
        String node = "太平洋号";
        CrawlerJob crawlerJob = PcautoWebHjCoreSimple91CrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        RealtimeSimpleCrawlerTriggerInfo.simpleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,node);
    }
    public static void publishModuleSimple92Job(){
        String node = "太平洋号";
        CrawlerJob crawlerJob = PcautoWebHjCoreSimple92CrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        RealtimeSimpleCrawlerTriggerInfo.simpleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,node);
    }
    public static void publishModuleSimple41Job(){
        String node = "太平洋号";
        CrawlerJob crawlerJob = PcautoWebHjCoreSimple41CrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        RealtimeSimpleCrawlerTriggerInfo.simpleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,node);
    }


    /**
     * 太平洋号实时采集调度
     */
    public static void publishModuleRealtimeJob(){
        String node = "太平洋号";
        CrawlerJob crawlerJob = PcautoWebHjRealtimeCrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        RealtimeCronCrawlerTriggerInfo.simpleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,node);
    }

    /**
     * 太平洋号实时采集调度
     */
    public static void publishModuleTraceJob(){
        String node = "太平洋号";
        CrawlerJob crawlerJob = PcautoWebHjTraceCrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        TraceCronCrawlerTriggerInfo.simpleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,node);
    }


}
